<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基础示例</title>
    <style>
        .container {
            /* width: 500px; */
            /* height: 500px; */
            background-color: #ddd;

            display: grid;
             grid-template-columns: 100px 200px;
             /*grid-template: 50px 50px / 200px;  !* 行/列 *!*/
             /*grid-template-columns: 1fr 2fr;*/
             /*grid-template-columns: repeat(4, 1fr);*/
             /*grid-template-columns: repeat(auto-fill, 150px); !*auto-fill自动填充列的数量*!*/
             /*grid-template-columns: 300px minmax(100px, 300px) 300px;*/
            /*grid-template-columns: repeat(auto-fill, 150px);*/
            /*gap: 10px 20px;  !*行/列间距*!*/
            grid-column-gap: 10px;
            grid-row-gap :20px
        }

        .box1 {
            /* width: 200px; */
            /* height: 200px; */
            background-color: pink;
        }

        .box2 {
            /* width: 200px; */
            /* height: 200px; */
            background-color: tomato;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="box1">a</div>
        <div class="box2">b</div>
        <div class="box1">c</div>
    </div>
</body>

</html>